package com.zhiyou100.taxi.entity;

import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

public class CarCheck implements Serializable {
    private String carCheckId;

    private String carId;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date carCheckTime;

    private String carDescribe;

    private String userId;

    private static final long serialVersionUID = 1L;

    public String getCarCheckId() {
        return carCheckId;
    }

    public void setCarCheckId(String carCheckId) {
        this.carCheckId = carCheckId == null ? null : carCheckId.trim();
    }

    public String getCarId() {
        return carId;
    }

    public void setCarId(String carId) {
        this.carId = carId == null ? null : carId.trim();
    }

    public Date getCarCheckTime() {
        return carCheckTime;
    }

    public void setCarCheckTime(Date carCheckTime) {
        this.carCheckTime = carCheckTime;
    }

    public String getCarDescribe() {
        return carDescribe;
    }

    public void setCarDescribe(String carDescribe) {
        this.carDescribe = carDescribe == null ? null : carDescribe.trim();
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId == null ? null : userId.trim();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CarCheck other = (CarCheck) that;
        return (this.getCarCheckId() == null ? other.getCarCheckId() == null : this.getCarCheckId().equals(other.getCarCheckId()))
                && (this.getCarId() == null ? other.getCarId() == null : this.getCarId().equals(other.getCarId()))
                && (this.getCarCheckTime() == null ? other.getCarCheckTime() == null : this.getCarCheckTime().equals(other.getCarCheckTime()))
                && (this.getCarDescribe() == null ? other.getCarDescribe() == null : this.getCarDescribe().equals(other.getCarDescribe()))
                && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCarCheckId() == null) ? 0 : getCarCheckId().hashCode());
        result = prime * result + ((getCarId() == null) ? 0 : getCarId().hashCode());
        result = prime * result + ((getCarCheckTime() == null) ? 0 : getCarCheckTime().hashCode());
        result = prime * result + ((getCarDescribe() == null) ? 0 : getCarDescribe().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", carCheckId=").append(carCheckId);
        sb.append(", carId=").append(carId);
        sb.append(", carCheckTime=").append(carCheckTime);
        sb.append(", carDescribe=").append(carDescribe);
        sb.append(", userId=").append(userId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}